package dfl.bysj.entity;

import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Objects;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author DFL
 * @since 2022-04-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="Student对象", description="")
public class Student implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId
     private Integer stuId;

    private String stuName;

    private Integer stuPhone;

    private Integer graId;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime createTime;
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime updateTime;


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Student student = (Student) o;
        return Objects.equals(stuId, student.stuId) && Objects.equals(stuName, student.stuName) && Objects.equals(stuPhone, student.stuPhone) && Objects.equals(graId, student.graId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(stuId, stuName, stuPhone, graId);
    }
}
